#!/usr/bin/env node

const http = require('http');

const addr = 'http://www.baidu.com';

http.get(addr, (res)=>{
  console.log(`HTTTP/${res.httpVersion} ${res.statusCode} ${res.statusMessage}`);
  console.log(res.headers);
  console.log();
  res.pipe(process.stdout);
});
